<form action="" id="myform">
<?php foreach($find_customer as $find_customer):?>
<div id="inline1">
<h2><span>客户信息</span></h2>
<table>
        <tr><th colspan="7">基本信息：</th></tr>
        <tr bgcolor="#FDECCA" height="30" style=" width:512px; color:#000;">
        	<td width="80" align="right">客户名称：</td>
            <td>&nbsp;</td>
            <td colspan="5" id="customer_name"><?=$find_customer->customer_name?></td>
        </tr>
        <tr>
            <td class="name" width="80">共享：</td>
            <td>&nbsp;</td>
            <td colspan="5"><?=$find_customer->share?></td>
        </tr>
        <tr>
        	<td class="name" width="80">所属区域：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$region_name?></td>
            <td>&nbsp;</td>
            <td class="name" width="80">标签：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$find_customer->tag?></td>
        </tr>
        <tr>
        	<td class="name" width="80">上级客户：</td>
            <td>&nbsp;</td>
            <td width="170">
            <?= $find_customer->superior_customer?>
            </td>
            <td>&nbsp;</td>
            <td class="name" width="80">三产公司：</td>
            <td>&nbsp;</td>
            <td colspan="5" width="170"><?=$find_customer->produce_company?></td>
        </tr>
        <tr>
            <td class="gj_name">公司简介：</td>
            <td>&nbsp;</td>
            <td height="80" colspan="5" valign="top"><?=$find_customer->company_introduce?></td>
        </tr>
        <tr><th colspan="7">联系方式：</th></tr>
        <tr>
        	<td class="name" width="80">邮编：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$find_customer->email?></td>
            <td>&nbsp;</td>
            <td class="name" width="80">电话：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$find_customer->phone?></td>
        </tr>
        <tr>
            <td class="name" width="80">传真：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$find_customer->fax?></td>
            <td>&nbsp;</td>
            <td class="name" width="80">省份：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$find_customer->province?></td>
        </tr>
        <tr>
            <td class="name" width="80">城市：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$find_customer->city?></td>
            <td>&nbsp;</td>
            <td class="name" width="80">区县：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$find_customer->county?></td>
        </tr>
        <tr>
            <td class="name" width="80">地址：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$find_customer->address?></td>
            <td>&nbsp;</td>
            <td class="name" width="80">网址：</td>
            <td>&nbsp;</td>
            <td width="170"><?=$find_customer->website?></td>
        </tr>
        <tr>
            <td class="gj_name">备注：</td>
            <td>&nbsp;</td>
            <td height="80" colspan="5" valign="top"><?=$find_customer->remark?></td>
        </tr>
        <tr><td colspan="5">&nbsp;</td></tr>
  </table>
</div>
<div class="view_inline1">
    <table>
      <tr class="view_inline1_1"><th class="view_tit_l">日程</th><th align="right" class="view_tit_r">
      <a href="index.php/customer/add_schedule/<?=$find_customer->id?>" class="various1" id="find">新建</a></th></tr>
        <?php foreach($find_schedules as $find_schedule):?>
        <?php  $createtime = substr($find_schedule->create_time, 0, 10);
        	   $subject = substr($find_schedule->subject, 0, 36);
        ?>
		  <tr>
        	<td colspan="2">
        	<a href="index.php/schedule/check/<?= $createtime?>/<?= $find_schedule->schedule_id?>" class="various1" id="find">
        	<?= $subject?></a>&nbsp;&nbsp;&nbsp;&nbsp;<?= $createtime?></td>
    	  </tr>
		<?php endforeach;?>
		
		<tr class="view_inline1_4"><th class="view_tit_l">联系人</th><th align="right" class="view_tit_r">
        <a href="index.php/contacter/show_contacter_add/<?=$find_customer->customer_name?>" class="various1" id="find">新建</a></th></tr>
		<?php foreach($find_contacters as $find_contacter):?>
		<?php  $createtime = substr($find_contacter->create_time, 0, 10);?>
        <tr>
        	<td colspan="2"><a href="index.php/contacter/find/<?= $find_contacter->id?>" class="various1" id="find">
        	<?= $find_contacter->name?></a>&nbsp;&nbsp;&nbsp;&nbsp;<?= $createtime?></td>
      	</tr>
      	<?php endforeach;?>
		
        <tr class="view_inline1_2">
        <th class="view_tit_l">销售机会</th>
        <th align="right" class="view_tit_r"><a href="index.php/opportunity/show_contacter_add/<?=$find_customer->customer_name?>"  class="various1" id="find">新建</a></th></tr>
        <?php foreach($find_opportunitys as $find_opportunity):?>
        <?php  $createtime = substr($find_opportunity->create_time, 0, 10);?>
        <tr>
       	  <td colspan="2">
       	  <a href="index.php/opportunity/find/<?= $find_opportunity->id?>"  class="various1" id="find">
       	  <?= $find_opportunity->subject?></a>&nbsp;&nbsp;&nbsp;&nbsp;<?= $createtime?></td>
    	</tr>
		<?php endforeach;?>
        <tr class="view_inline1_3"><th class="view_tit_l">合同订单</th><th align="right" class="view_tit_r">
        <a href="index.php/contract/show_contract_add/<?=$find_customer->customer_name?>" class="various1" id="find">新建</a></th></tr>
        <?php foreach($find_contracts as $find_contract):?>
        <?php  $createtime = substr($find_contract->create_time, 0, 10);?>
        <tr>
       	  <td colspan="2"><a href="#"><?= $find_contract->subject?></a>&nbsp;&nbsp;&nbsp;&nbsp;<?= $createtime?></td>
    	</tr>
		<?php endforeach;?>

    </table>
</div>
<?php endforeach;?>
</form>
<script type="text/javascript">
	$(document).ready(function() {
		jQuery.ajaxSetup ({cache:false}); /*让ajax不调用浏览的缓存*/
		$(".various1").fancybox({
		'titleShow'     : false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'easingIn'      : 'easeOutBack',
		'easingOut'     : 'easeInBack',
		'onComplete'	: function() {
				var suggest = new GoogleSuggest("myform", "customer_name", 0);
			}
		});
	});
</script>